<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.HashSet" %>
<%@ page import="java.util.Set" %>
<%@ page import="java.io.BufferedReader" %>
<%@ page import="java.io.IOException" %>
<%@ page import="java.io.InputStream" %>
<%@ page import="java.io.InputStreamReader" %>
<%@ page import="java.net.HttpURLConnection" %>
<%@ page import="java.net.MalformedURLException" %>
<%@ page import="java.net.URL" %>
<%
String nodeid = request.getParameter("node");
System.out.println("当前异步父节点：" + nodeid);
String strUrl=null;
if(null==nodeid){
strUrl = "http://localhost:28080/webapp/data/emulation/channel.json";
}
else{
strUrl="http://localhost:28080/webapp/data/emulation/"+nodeid+".json";
}

//if(nodeid.equals("/")){strUrl="http://localhost:28080/webapp/data/emulation/root.json";}
//if(nodeid.equals("/全省共享资源")){strUrl="http://localhost:28080/webapp/data/emulation/global_province_resource.json";}
//if(nodeid.equals("/全省共享资源/频道")){strUrl="http://localhost:28080/webapp/data/emulation/channel.json";}

URL url = new URL(strUrl);
HttpURLConnection huc = (HttpURLConnection) url.openConnection();
	huc.connect();
	InputStream is = huc.getInputStream();
	InputStreamReader isr = new InputStreamReader(is, "UTF-8");
	BufferedReader br = new BufferedReader(isr);
	StringBuffer sb = new StringBuffer();
	for (String line; (line = br.readLine()) != null;) {
		sb.append(line);
	}
	huc.disconnect();
out.println(sb.toString());
%>
